package dodo;

import java.awt.Color;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;

import javax.swing.JFrame;

import dodo.mindmap.MApplet;
import dodo.mindmap.Mindmap;
import dodo.mindmap.Node;
import dodo.mindmap.NodeStyle;

import processing.core.PApplet;
import processing.core.PGraphics;
import geomerative.*;;

public class Test extends MApplet {
	Mindmap m;
	Node n;

	public void setup(){
		GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
		JFrame frame = new JFrame("Processing");
		gd.setFullScreenWindow(frame);
		frame.add(this);
		size(screen.width, screen.height);
		m = new Mindmap(this, "http://172.16.1.5:80");
		
		
		/*n = new Node(m,new RPoint(screen.width/2,screen.height/2), new RPoint(200,200), 100000, NodeStyle.basenode, NodeStyle.basenodeText, title, content);
		
		Node.sendCreateNode(n);
		
		m.setBase(n);*/
	}

	public void draw(){
		m.draw();
	}

	public static void main(String [] args)
	{
	      PApplet.main(new String[] { "--present", "dodo.Test" });
	}
}